_require local "../../../../basis.smi"
_require local "../../../extensions/debug/main/Bug.smi"
_require local "../../../libs/env/main/IEnv.smi"
_require local "../../../libs/env/main/ISet.smi"

_require local "./GRAPH.sig"

structure Graph =
struct
  type node_id = int
  type 'n graph (= {})
  val empty : 'n graph
  val addNode : 'n graph -> 'n -> ('n graph * node_id)
  val addEdge : 'n graph -> node_id * node_id  -> 'n graph
  val listNodes : 'n graph -> (node_id * 'n) list
  val getNodeInfo : 'n graph -> node_id -> 'n option
  val scc : 'n graph  -> (node_id list) list
  val printNodes : node_id list -> unit
end
